package com.zf.rocketmq.consumer.listener;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * 消费 oneway_topic
 */
@Component
@RocketMQMessageListener(consumerGroup = "spring_oneway_topic_cg", topic = "oneway_topic")
public class ConsumerOnewayMsgListener implements RocketMQListener<String> {
    /**
     * 该方法由 RocketMQListener 接口提供，用来消费消息。
     */
    @Override
    public void onMessage(String message) {
        System.out.printf("oneway_topic：%s\n", message);
    }

}
